import axios from '../axios'

export const addCategory = (params) => {
    return axios.post(`goods/category`, params)
}

export const modifyCategory= (id, params) => {
    return axios.patch(`goods/category/` + id, params)
}

export const categoryList = () => {
    return axios.get(`goods/category/list`)
}

export const categoryTree = () => {
    return axios.get(`goods/category/tree`)
}

export const removeCategory = (id) => {
    return axios.delete(`goods/category/` + id);
}